public class Test {
    public static void main(String[] args) {
        TestBinaryTree testBinaryTree = new TestBinaryTree();
        TestBinaryTree.TreeNode root = testBinaryTree.createTree();
        System.out.println("====");
        testBinaryTree.preOrder(root);
        System.out.println();
        testBinaryTree.inOrder(root);
        System.out.println();
        testBinaryTree.postOrder(root);
        System.out.println();
        System.out.println("====");

        System.out.println("节点个数 :" + testBinaryTree.size(root));
        testBinaryTree.size2(root);
        System.out.println("节点个数2 :" + TestBinaryTree.nodeSize);

        System.out.println("===============");
        System.out.println("叶子节点个数 :" +
                testBinaryTree.getLeafNodeCount(root));

        System.out.println("====================");
        System.out.println("第K层节点个数 :" +
                testBinaryTree.getKLevelNodeCount(root,3));

        System.out.println("=================");
        System.out.println("二叉树的高度 :" +
                testBinaryTree.getHeight(root));

        System.out.println("=====================");
        TestBinaryTree.TreeNode ret = testBinaryTree.find(root,'A');
        System.out.println("查找 " + ret.val);
    }

}
